﻿// MT595




using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category5
{
  public class MT595 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagChoiceDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagSubItemDefinition U000F;
    private static SwiftTagSubItemDefinition U0010;
    private static SwiftTagSubItemDefinition U0011;
    private static SwiftTagSubItemDefinition U0012;
    private static SwiftTagSubItemDefinition U0013;
    private static SwiftTagDefinition U0014;
    private static SwiftTagSubItemDefinition U0015;
    private static SwiftTagSubItemDefinition U0016;
    private static SwiftTagSubItemDefinition U0017;
    private static SwiftTagSubItemDefinition U0018;
    private static SwiftTagSubItemDefinition U0019;
    private static SwiftTagChoiceDefinition U001A;
    private static SwiftTagDefinition U001B;
    private static SwiftTagDefinition U001C;
    private static SwiftTagSubItemDefinition U001D;
    private static SwiftTagSubItemDefinition U001E;

    [Description("Transaction Reference Number")]
    public Tag20 TransactionReferenceNumber_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U0002);
      }
    }

    [Description("Transaction Reference Number")]
    public Tag20 Tag20_TransactionReferenceNumber
    {
      get
      {
        return this.TransactionReferenceNumber_20;
      }
    }

    [Description("Related Reference")]
    public Tag21 RelatedReference_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U0004);
      }
    }

    [Description("Related Reference")]
    public Tag21 Tag21_RelatedReference
    {
      get
      {
        return this.RelatedReference_21;
      }
    }

    [Description("Queries")]
    public Tag75 Queries_75
    {
      get
      {
        return new Tag75((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U0006);
      }
    }

    [Description("Queries")]
    public Tag75 Tag75_Queries
    {
      get
      {
        return this.Queries_75;
      }
    }

    [Description("Narrative")]
    public Tag77A Narrative_77A
    {
      get
      {
        return new Tag77A((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U0007);
      }
    }

    [Description("Narrative")]
    public Tag77A Tag77A_Narrative
    {
      get
      {
        return this.Narrative_77A;
      }
    }

    [Description("MT and Date of the Original Message")]
    public Tag11R MTAndDateOfTheOriginalMessage_11R
    {
      get
      {
        return new Tag11R((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U000E);
      }
    }

    [Description("MT and Date of the Original Message")]
    public Tag11R Tag11R_MTAndDateOfTheOriginalMessage
    {
      get
      {
        return this.MTAndDateOfTheOriginalMessage_11R;
      }
    }

    [Description("MT and Date of the Original Message")]
    public Tag11S MTAndDateOfTheOriginalMessage_11S
    {
      get
      {
        return new Tag11S((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U0014);
      }
    }

    [Description("MT and Date of the Original Message")]
    public Tag11S Tag11S_MTAndDateOfTheOriginalMessage
    {
      get
      {
        return this.MTAndDateOfTheOriginalMessage_11S;
      }
    }

    [Description("Narrative Description of the Message to Which the Query Relates")]
    public Tag79 Narrative_79
    {
      get
      {
        return new Tag79((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U001B);
      }
    }

    [Description("Narrative Description of the Message to Which the Query Relates")]
    public Tag79 Tag79_Narrative
    {
      get
      {
        return this.Narrative_79;
      }
    }

    [Description("")]
    public TagCopyOfMandatoryFields CopyOfMandatoryFields
    {
      get
      {
        return new TagCopyOfMandatoryFields((SwiftElement) this, 0, (SwiftDefinitionElement) MT595.U001C);
      }
    }

    public MT595()
      : base(true)
    {
    }

    public MT595(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT595.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT595.MessageDefinition = new SwiftMessageDefinition("MT595", "Queries");
      MT595.U0002 = new SwiftTagDefinition("TransactionReferenceNumber_20", "Transaction Reference Number");
      MT595.U0002.TagName = ":20:";
      MT595.U0003 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT595.U0002.Elements.Add((SwiftDefinitionElement) MT595.U0003);
      MT595.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT595.U0002);
      MT595.U0004 = new SwiftTagDefinition("RelatedReference_21", "Related Reference");
      MT595.U0004.TagName = ":21:";
      MT595.U0005 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT595.U0004.Elements.Add((SwiftDefinitionElement) MT595.U0005);
      MT595.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT595.U0004);
      MT595.U0006 = new SwiftTagDefinition("Queries_75", "Queries");
      MT595.U0006.TagName = ":75:";
      MT595.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT595.U0006);
      MT595.U0007 = new SwiftTagDefinition("Narrative_77A", "Narrative");
      MT595.U0007.TagName = ":77A:";
      MT595.U0007.Mandatory = false;
      MT595.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT595.U0007);
      MT595.U0008 = new SwiftTagChoiceDefinition("Choice", "");
      MT595.U0008.Mandatory = false;
      MT595.U0008.Multiple = true;
      MT595.U000E = new SwiftTagDefinition("MTAndDateOfTheOriginalMessage_11R", "MT and Date of the Original Message");
      MT595.U000E.TagName = ":11R:";
      MT595.U000F = new SwiftTagSubItemDefinition("MTNumber", "Message Type Number");
      MT595.U000E.Elements.Add((SwiftDefinitionElement) MT595.U000F);
      MT595.U0010 = new SwiftTagSubItemDefinition("Date", "Date");
      MT595.U000E.Elements.Add((SwiftDefinitionElement) MT595.U0010);
      MT595.U0011 = new SwiftTagSubItemDefinition("SessionNumberAndISN", "Session Number And ISN");
      MT595.U0011.Mandatory = false;
      MT595.U0012 = new SwiftTagSubItemDefinition("SessionNumber", "Session Number");
      MT595.U0012.Mandatory = false;
      MT595.U0011.Elements.Add((SwiftDefinitionElement) MT595.U0012);
      MT595.U0013 = new SwiftTagSubItemDefinition("ISN", "Input Sequence Number");
      MT595.U0013.Mandatory = false;
      MT595.U0011.Elements.Add((SwiftDefinitionElement) MT595.U0013);
      MT595.U000E.Elements.Add((SwiftDefinitionElement) MT595.U0011);
      MT595.U0008.Elements.Add((SwiftDefinitionElement) MT595.U000E);
      MT595.U0014 = new SwiftTagDefinition("MTAndDateOfTheOriginalMessage_11S", "MT and Date of the Original Message");
      MT595.U0014.TagName = ":11S:";
      MT595.U0015 = new SwiftTagSubItemDefinition("MTNumber", "Message Type Number");
      MT595.U0014.Elements.Add((SwiftDefinitionElement) MT595.U0015);
      MT595.U0016 = new SwiftTagSubItemDefinition("Date", "Date");
      MT595.U0014.Elements.Add((SwiftDefinitionElement) MT595.U0016);
      MT595.U0017 = new SwiftTagSubItemDefinition("SessionNumberAndISN", "Session Number And ISN");
      MT595.U0017.Mandatory = false;
      MT595.U0018 = new SwiftTagSubItemDefinition("SessionNumber", "Session Number");
      MT595.U0018.Mandatory = false;
      MT595.U0017.Elements.Add((SwiftDefinitionElement) MT595.U0018);
      MT595.U0019 = new SwiftTagSubItemDefinition("ISN", "Input Sequence Number");
      MT595.U0019.Mandatory = false;
      MT595.U0017.Elements.Add((SwiftDefinitionElement) MT595.U0019);
      MT595.U0014.Elements.Add((SwiftDefinitionElement) MT595.U0017);
      MT595.U0008.Elements.Add((SwiftDefinitionElement) MT595.U0014);
      MT595.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT595.U0008);
      MT595.U001A = new SwiftTagChoiceDefinition("Choice", "");
      MT595.U001A.Mandatory = false;
      MT595.U001A.Multiple = true;
      MT595.U001B = new SwiftTagDefinition("Narrative_79", "Narrative Description of the Message to Which the Query Relates");
      MT595.U001B.TagName = ":79:";
      MT595.U001A.Elements.Add((SwiftDefinitionElement) MT595.U001B);
      MT595.U001C = new SwiftTagDefinition("CopyOfMandatoryFields", "");
      MT595.U001C.TagName = ":";
      MT595.U001D = new SwiftTagSubItemDefinition("MandatoryFieldRecord", "");
      MT595.U001E = new SwiftTagSubItemDefinition("OriginalMessageField", "");
      MT595.U001E.Mandatory = false;
      MT595.U001D.Elements.Add((SwiftDefinitionElement) MT595.U001E);
      MT595.U001C.Elements.Add((SwiftDefinitionElement) MT595.U001D);
      MT595.U001A.Elements.Add((SwiftDefinitionElement) MT595.U001C);
      MT595.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT595.U001A);
    }
  }
}
